@{
    ViewData["Title"] = "报表中心";
}

<div class="container-fluid">
    <h1 class="h3 mb-4 text-gray-800">报表中心</h1>
    
    <!-- 数据概览 -->
    <div class="row">
        <!-- 客户总数 -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">
                                客户总数</div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">@ViewBag.CustomerCount</div>
                        </div>
                        <div class="col-auto">
                            <i class="fas fa-users fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 供应商总数 -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-success shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-success text-uppercase mb-1">
                                供应商总数</div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">@ViewBag.SupplierCount</div>
                        </div>
                        <div class="col-auto">
                            <i class="fas fa-building fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 员工总数 -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-info shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-info text-uppercase mb-1">员工总数
                            </div>
                            <div class="h5 mb-0 mr-3 font-weight-bold text-gray-800">@ViewBag.EmployeeCount</div>
                        </div>
                        <div class="col-auto">
                            <i class="fas fa-id-card fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 近期新增客户 -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-warning shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-warning text-uppercase mb-1">
                                近7日新增客户</div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">@ViewBag.NewCustomersCount</div>
                        </div>
                        <div class="col-auto">
                            <i class="fas fa-user-plus fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 报表导航卡片 -->
    <div class="row">
        <!-- 客户报表 -->
        <div class="col-lg-4 mb-4">
            <div class="card shadow">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-primary">客户数据分析</h6>
                </div>
                <div class="card-body text-center">
                    <i class="fas fa-chart-pie fa-5x mb-3 text-primary"></i>
                    <h5>客户数据分析</h5>
                    <p>分析客户分布、类型、信用等级等数据，帮助您更好地了解客户构成。</p>
                    <a href="@Url.Action("CustomerReport", "Report")" class="btn btn-primary btn-block">
                        <i class="fas fa-arrow-right"></i> 查看报表
                    </a>
                </div>
            </div>
        </div>

        <!-- 供应商报表 -->
        <div class="col-lg-4 mb-4">
            <div class="card shadow">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-success">供应商数据分析</h6>
                </div>
                <div class="card-body text-center">
                    <i class="fas fa-chart-bar fa-5x mb-3 text-success"></i>
                    <h5>供应商数据分析</h5>
                    <p>分析供应商分布、类型、信用等级等数据，帮助您更好地了解供应商构成。</p>
                    <a href="@Url.Action("SupplierReport", "Report")" class="btn btn-success btn-block">
                        <i class="fas fa-arrow-right"></i> 查看报表
                    </a>
                </div>
            </div>
        </div>

        <!-- 员工报表 -->
        <div class="col-lg-4 mb-4">
            <div class="card shadow">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-info">员工数据分析</h6>
                </div>
                <div class="card-body text-center">
                    <i class="fas fa-chart-line fa-5x mb-3 text-info"></i>
                    <h5>员工数据分析</h5>
                    <p>分析员工部门分布、职位、状态等数据，帮助您更好地了解员工构成。</p>
                    <a href="@Url.Action("EmployeeReport", "Report")" class="btn btn-info btn-block">
                        <i class="fas fa-arrow-right"></i> 查看报表
                    </a>
                </div>
            </div>
        </div>
    </div>

    <!-- 批量导出区域 -->
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary">报表导出</h6>
        </div>
        <div class="card-body">
            <p>您可以将系统中的数据导出为Excel格式，方便进行离线分析和备份。</p>
            <div class="row">
                <div class="col-md-4">
                    <a href="@Url.Action("ExportCustomers", "Report")" class="btn btn-outline-primary btn-block mb-3">
                        <i class="fas fa-file-excel"></i> 导出客户数据
                    </a>
                </div>
                <div class="col-md-4">
                    <a href="@Url.Action("ExportSuppliers", "Report")" class="btn btn-outline-success btn-block mb-3">
                        <i class="fas fa-file-excel"></i> 导出供应商数据
                    </a>
                </div>
                <div class="col-md-4">
                    <a href="@Url.Action("ExportEmployees", "Report")" class="btn btn-outline-info btn-block mb-3">
                        <i class="fas fa-file-excel"></i> 导出员工数据
                    </a>
                </div>
            </div>
        </div>
    </div>
</div> 